All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.util.QTByteObject
java.lang.Object
|
+----quicktime.util.QTByteObject
- public class QTByteObject
- extends Object
- implements PrimitivesLib, Serializable
Provides a representation of the native data structure as a byte array.
The class implements the Serializable interface and can thus be serialized.
However the byte[] member is marked as transient because typically a QTByteObject
is used to contain objects that have fields, such as shorts, ints, that are larger
than bytes. Moving these objects from big to little to big endian run-time architectures
can cause problems if the endian issues of these members are not taken care of by
the particular class of the object that is being serialized. Thus, any subclass of QTByteObject
that is to be serialized defines custome read and write object methods that will
ensure that the serialized data that is written out is in big endian format, and if required
will be flipped back to native format when read in.
-
equals(Object)
- Returns true if the two objects have the same value.
-
fromArray(byte[])
- This call will return a QTByteObject which becomes a proxy for the
specified byte array.
-
getBytes()
-
Returns the byte array containing the packed native object.
-
getSize()
-
Returns the size of the represented native object.
-
toString()
- Returns a string representation of this object
fromArray
public static QTByteObject fromArray(byte ar[])
- This call will return a QTByteObject which becomes a proxy for the
specified byte array. It does not copy the byte array - but references it.
- Parameters:
- ar - the byte array to represent
- Returns:
- a QTByteObject with the specified array as its target bytes
getBytes
public final byte[] getBytes()
- Returns the byte array containing the packed native object.
- Returns:
- the actual byte array NOT a copy
getSize
public int getSize()
- Returns the size of the represented native object.
- Returns:
- size
equals
public boolean equals(Object obj)
- Returns true if the two objects have the same value.
- Overrides:
- equals in class Object
toString
public String toString()
- Returns a string representation of this object
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index